From ac9595600a2a517d2ae3e8eba2ca7bece020acb8 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 22 Apr 2006 10:37:24 +0100 Subject: [PATCH] Avoid spurious timer activations in migrate_timer(). Signed-off-by: Keir Fraser --- xen/common/timer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xen/common/timer.c b/xen/common/timer.c index e62a74ee23..10985fdd8b 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -251,12 +251,15 @@ void migrate_timer(struct timer *timer, unsigned int new_cpu) } if ( active_timer(timer) ) + { __stop_timer(timer); - - timer->cpu = new_cpu; - - if ( likely(!timer->killed) ) + timer->cpu = new_cpu; __add_timer(timer); + } + else + { + timer->cpu = new_cpu; + } spin_unlock(&timers[old_cpu].lock); spin_unlock_irqrestore(&timers[new_cpu].lock, flags); -- 2.30.2